Skip to content

Conversation

@SteveL-MSFT
Copy link
Member

@SteveL-MSFT SteveL-MSFT commented Nov 2, 2023

PR Summary

  • Removed resourceId() regex and replaced with a function
  • Add execution of expressions to get/set/test resource properties
  • This integration allows use of concat() and base64() functions within a configuration
  • Change from HashMap to serde Map for resource properties so don't need to transform from one type to the other due to nested properties
  • Expressions are evaluated only for resource properties at invocation time
  • NOTE: when converting Value to string, you have to use as_str() instead of to_string() as the latter includes outer quotes

PR Context

Partially implements #57

@SteveL-MSFT
Copy link
Member Author

The test failure is due to not handling nested types in expression invocation so fixing that.

@SteveL-MSFT
Copy link
Member Author

The remaining failure is due to properties that get returned may look like an expression so if you pipe that back to dsc, it fails. I think the right thing to do here is if it's retrieved via config, then it needs to escape it if it starts and ends with brackets.

@SteveL-MSFT SteveL-MSFT added this pull request to the merge queue Nov 7, 2023
Merged via the queue into PowerShell:main with commit 0ab0fdd Nov 7, 2023
@SteveL-MSFT SteveL-MSFT deleted the resourceid-func branch November 7, 2023 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants